3.2.14 \(\int \frac {c+d x^2+e x^4+f x^6}{x^2 (a+b x^2)} \, dx\)

Optimal. Leaf size=84 \[ -\frac {\tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \left (a^3 (-f)+a^2 b e-a b^2 d+b^3 c\right )}{a^{3/2} b^{5/2}}+\frac {x (b e-a f)}{b^2}-\frac {c}{a x}+\frac {f x^3}{3 b} \]

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {1802, 205} \begin {gather*} -\frac {\tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \left (a^2 b e+a^3 (-f)-a b^2 d+b^3 c\right )}{a^{3/2} b^{5/2}}+\frac {x (b e-a f)}{b^2}-\frac {c}{a x}+\frac {f x^3}{3 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x^2 + e*x^4 + f*x^6)/(x^2*(a + b*x^2)),x]

[Out]

-(c/(a*x)) + ((b*e - a*f)*x)/b^2 + (f*x^3)/(3*b) - ((b^3*c - a*b^2*d + a^2*b*e - a^3*f)*ArcTan[(Sqrt[b]*x)/Sqr
t[a]])/(a^(3/2)*b^(5/2))

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 1802

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*Pq*(a + b*x
^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

\begin {align*} \int \frac {c+d x^2+e x^4+f x^6}{x^2 \left (a+b x^2\right )} \, dx &=\int \left (\frac {b e-a f}{b^2}+\frac {c}{a x^2}+\frac {f x^2}{b}+\frac {-b^3 c+a b^2 d-a^2 b e+a^3 f}{a b^2 \left (a+b x^2\right )}\right ) \, dx\\ &=-\frac {c}{a x}+\frac {(b e-a f) x}{b^2}+\frac {f x^3}{3 b}+\frac {\left (-b^3 c+a b^2 d-a^2 b e+a^3 f\right ) \int \frac {1}{a+b x^2} \, dx}{a b^2}\\ &=-\frac {c}{a x}+\frac {(b e-a f) x}{b^2}+\frac {f x^3}{3 b}-\frac {\left (b^3 c-a b^2 d+a^2 b e-a^3 f\right ) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{3/2} b^{5/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 83, normalized size = 0.99 \begin {gather*} \frac {\tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \left (a^3 f-a^2 b e+a b^2 d-b^3 c\right )}{a^{3/2} b^{5/2}}+\frac {x (b e-a f)}{b^2}-\frac {c}{a x}+\frac {f x^3}{3 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x^2 + e*x^4 + f*x^6)/(x^2*(a + b*x^2)),x]

[Out]

-(c/(a*x)) + ((b*e - a*f)*x)/b^2 + (f*x^3)/(3*b) + ((-(b^3*c) + a*b^2*d - a^2*b*e + a^3*f)*ArcTan[(Sqrt[b]*x)/
Sqrt[a]])/(a^(3/2)*b^(5/2))

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {c+d x^2+e x^4+f x^6}{x^2 \left (a+b x^2\right )} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(c + d*x^2 + e*x^4 + f*x^6)/(x^2*(a + b*x^2)),x]

[Out]

IntegrateAlgebraic[(c + d*x^2 + e*x^4 + f*x^6)/(x^2*(a + b*x^2)), x]

________________________________________________________________________________________

fricas [A]  time = 1.25, size = 211, normalized size = 2.51 \begin {gather*} \left [\frac {2 \, a^{2} b^{2} f x^{4} - 6 \, a b^{3} c + 3 \, {\left (b^{3} c - a b^{2} d + a^{2} b e - a^{3} f\right )} \sqrt {-a b} x \log \left (\frac {b x^{2} - 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right ) + 6 \, {\left (a^{2} b^{2} e - a^{3} b f\right )} x^{2}}{6 \, a^{2} b^{3} x}, \frac {a^{2} b^{2} f x^{4} - 3 \, a b^{3} c - 3 \, {\left (b^{3} c - a b^{2} d + a^{2} b e - a^{3} f\right )} \sqrt {a b} x \arctan \left (\frac {\sqrt {a b} x}{a}\right ) + 3 \, {\left (a^{2} b^{2} e - a^{3} b f\right )} x^{2}}{3 \, a^{2} b^{3} x}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/x^2/(b*x^2+a),x, algorithm="fricas")

[Out]

[1/6*(2*a^2*b^2*f*x^4 - 6*a*b^3*c + 3*(b^3*c - a*b^2*d + a^2*b*e - a^3*f)*sqrt(-a*b)*x*log((b*x^2 - 2*sqrt(-a*
b)*x - a)/(b*x^2 + a)) + 6*(a^2*b^2*e - a^3*b*f)*x^2)/(a^2*b^3*x), 1/3*(a^2*b^2*f*x^4 - 3*a*b^3*c - 3*(b^3*c -
 a*b^2*d + a^2*b*e - a^3*f)*sqrt(a*b)*x*arctan(sqrt(a*b)*x/a) + 3*(a^2*b^2*e - a^3*b*f)*x^2)/(a^2*b^3*x)]

________________________________________________________________________________________

giac [A]  time = 0.34, size = 86, normalized size = 1.02 \begin {gather*} -\frac {c}{a x} - \frac {{\left (b^{3} c - a b^{2} d - a^{3} f + a^{2} b e\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} a b^{2}} + \frac {b^{2} f x^{3} - 3 \, a b f x + 3 \, b^{2} x e}{3 \, b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/x^2/(b*x^2+a),x, algorithm="giac")

[Out]

-c/(a*x) - (b^3*c - a*b^2*d - a^3*f + a^2*b*e)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a*b^2) + 1/3*(b^2*f*x^3 - 3*a*
b*f*x + 3*b^2*x*e)/b^3

________________________________________________________________________________________

maple [A]  time = 0.01, size = 114, normalized size = 1.36 \begin {gather*} \frac {f \,x^{3}}{3 b}+\frac {a^{2} f \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}\, b^{2}}-\frac {a e \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}\, b}-\frac {b c \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}\, a}+\frac {d \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}}-\frac {a f x}{b^{2}}+\frac {e x}{b}-\frac {c}{a x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x^6+e*x^4+d*x^2+c)/x^2/(b*x^2+a),x)

[Out]

1/3*f*x^3/b-1/b^2*a*f*x+1/b*e*x+a^2/b^2/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x)*f-a/b/(a*b)^(1/2)*arctan(1/(a*b)
^(1/2)*b*x)*e+1/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x)*d-1/(a*b)^(1/2)/a*b*c*arctan(1/(a*b)^(1/2)*b*x)-1/a*c/x

________________________________________________________________________________________

maxima [A]  time = 2.93, size = 80, normalized size = 0.95 \begin {gather*} \frac {b f x^{3} + 3 \, {\left (b e - a f\right )} x}{3 \, b^{2}} - \frac {c}{a x} - \frac {{\left (b^{3} c - a b^{2} d + a^{2} b e - a^{3} f\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} a b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/x^2/(b*x^2+a),x, algorithm="maxima")

[Out]

1/3*(b*f*x^3 + 3*(b*e - a*f)*x)/b^2 - c/(a*x) - (b^3*c - a*b^2*d + a^2*b*e - a^3*f)*arctan(b*x/sqrt(a*b))/(sqr
t(a*b)*a*b^2)

________________________________________________________________________________________

mupad [B]  time = 1.07, size = 76, normalized size = 0.90 \begin {gather*} x\,\left (\frac {e}{b}-\frac {a\,f}{b^2}\right )-\frac {c}{a\,x}+\frac {f\,x^3}{3\,b}-\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )\,\left (-f\,a^3+e\,a^2\,b-d\,a\,b^2+c\,b^3\right )}{a^{3/2}\,b^{5/2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x^2 + e*x^4 + f*x^6)/(x^2*(a + b*x^2)),x)

[Out]

x*(e/b - (a*f)/b^2) - c/(a*x) + (f*x^3)/(3*b) - (atan((b^(1/2)*x)/a^(1/2))*(b^3*c - a^3*f - a*b^2*d + a^2*b*e)
)/(a^(3/2)*b^(5/2))

________________________________________________________________________________________

sympy [B]  time = 1.64, size = 150, normalized size = 1.79 \begin {gather*} x \left (- \frac {a f}{b^{2}} + \frac {e}{b}\right ) - \frac {\sqrt {- \frac {1}{a^{3} b^{5}}} \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right ) \log {\left (- a^{2} b^{2} \sqrt {- \frac {1}{a^{3} b^{5}}} + x \right )}}{2} + \frac {\sqrt {- \frac {1}{a^{3} b^{5}}} \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right ) \log {\left (a^{2} b^{2} \sqrt {- \frac {1}{a^{3} b^{5}}} + x \right )}}{2} + \frac {f x^{3}}{3 b} - \frac {c}{a x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x**6+e*x**4+d*x**2+c)/x**2/(b*x**2+a),x)

[Out]

x*(-a*f/b**2 + e/b) - sqrt(-1/(a**3*b**5))*(a**3*f - a**2*b*e + a*b**2*d - b**3*c)*log(-a**2*b**2*sqrt(-1/(a**
3*b**5)) + x)/2 + sqrt(-1/(a**3*b**5))*(a**3*f - a**2*b*e + a*b**2*d - b**3*c)*log(a**2*b**2*sqrt(-1/(a**3*b**
5)) + x)/2 + f*x**3/(3*b) - c/(a*x)

________________________________________________________________________________________